Previous Topic: CICS OverviewNext Topic: CICS Programs to Virtualize Panel


CICS Example

This example uses the VSE recorder to record a CICS LINK service image.

When the registry is started, it shows that the mainframe bridge has started in client mode and the bridge is connected to the LPAR agent.

This example demonstrates eliminating a resource dependency. In the example, a CICS application requires a VSAM file for input to fields for account balance information, but the VSAM file is unavailable. This example shows how to virtualize the program that maintains the missing VSAM file, eliminating the resource dependency.

The following graphic shows the CICS transaction (DEM3) that is running. The transaction runs from a 3270 terminal, but it could run from the CICS Transaction Gateway.

Running the transaction initiates DEMOAPP3, which performs a CICS LINK to DEMOINQ. DEMOINQ then runs the following CICS LINKs:

  1. A local LINK passes a COMMAREA to DEMOGETN to get the customer name and address from a VSAM.
  2. A CICS LINK to CICSB passes a COMMAREA to DEMOGETB. DEMOGETB reads the VSAM file DEMOGETBAL, which is not available in the example.
  3. A CICS LINK passes a COMMAREA to DEMOGETP to get the telephone number information.
  4. A CICS LINK passes a CHANNEL with CONTAINERS to DEMOLOGI.

The following CICS regions are involved:

This example virtualizes DEMOGETB on CICSTS41. The example uses the DevTest agent, running in CICSA, communicating with the LPAR agent, communicating with the VSE server. We first run the CICS transaction to record the CICS LINK to DEMOGETB. We then use that recording to virtualize the CICS LINK.

Concept diagram of the setup for the CICS LINK recording example in the VSE Guide, with VSE involved.

The Virtual Service Image Recorder Basics tab contains the name of the service image (DEMOGETB.vsi), the VSM (DEMOGETB.vsm), and the transport protocol of CICS LINK.

The CICS Programs to Virtualize panel displays next. For detailed information about this panel, see Using the CICS Programs to Virtualize Panel.

Recording starts when the Next button is clicked. During recording, we run transaction DEM3 to invoke DEMOGETB with a CICS LINK.

Screenshot of a CICS screen running the demo for the example recording.

As the following graphic shows, after it runs once, VSE records one transaction.

Screenshot of VSI recorder with one transaction recorded from the example CICS LINK recording.

On the next panel, VSE adds the CICS Copybook data protocol to both the request and response sides.

The following graphic shows the copybook mapping XML file to use in this example. This file defines the mapping for DEMOGETB and it indicates to use DEMOGETB.txt as the copybook if a request for the program DEMOGETB exists.

Copybook mapping XML file contents for the CICS LINK demo recording.

As the following example shows, DEMOGETB.txt contains the COBOL copybook definition:

Copybooks/DEMOGETB.txt
05  DEMOGETB-COMMAREA.
 10  DEMOGETB-RETURN             PIC X.
 10  DEMOGETB-MESSAGE            PIC X(70).
 10  BALANCE-REC.
     15  BALANCE-ACCOUNT-NBR     PIC X(8).
     15  FILLER                  PIC X.
     15  BALANCE-BALANCE         PIC X(14).
     15  FILLER                  PIC X.
     15  BALANCE-AVERAGE         PIC X(14).

On the next panel, the folder that has DEMOGETB.txt is specified, and the mapping XML. The codepage is changed to IBMO37.

Screenshot of the Configure How to Parse the Copybook Payloads panel for the CICS LINK recording example.

Click Next. The copybook processes the data.

Click Next to stop processing and complete the service image recording.

When you open the VSI in the Service Image Editor, you can see that the copybook mapped the request data, then converted it to attributes. For example:

Screenshot of the request data arguments for the CICS LINK recording example.

The copybook has also formatted the response. The following graphic shows the response to return when using virtualization:

Screenshot of the response to send back when using virtualization for the CICS LINK recording example.

Example

In this example, the VSAM file DEMOBAL is made unavailable, and program DEMO3 is run. DEMO3 fails because of the unavailability of DEMOBAL.

Screenshot of CICS screen for the CICS LINK example, showing the SUT being unavailable.

Next, the virtual service is deployed.

When the program DEMO3 is run again, it works, even though the VSAM file is still unavailable.

Screenshot of the CICS screen for the CICS LINK recording example, with success having VSE virtualize the SUT.